In [2]:
                          Title      Genre  Year  Rating     Revenue
0                        Avatar     Action  2009     7.8  2787965087
1                       Titanic    Romance  1997     7.8  2187463944
2  Star Wars: The Force Awakens     Sci-Fi  2015     7.9  2068223624
3                 The Lion King  Animation  2019     6.9  1656943394
4                     Inception     Sci-Fi  2010     8.8   828322032
In [3]:
In [4]:
In [5]:
In [8]:
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
Input In [8], in <cell line: 9>()
      7 # Plot the treemap
      8 plt.figure(figsize=(10, 8))
----> 9 squarify.plot(sizes=genre_revenue['Revenue'], label=genre_revenue['Genre'], alpha=0.8)
     10 plt.axis('off')
     11 plt.title('Treemap')

NameError: name 'squarify' is not defined

<Figure size 720x576 with 0 Axes>
In [9]:
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Input In [9], in <cell line: 1>()
----> 1 import squarify

ModuleNotFoundError: No module named 'squarify'

In [10]:
Collecting squarify
  Downloading squarify-0.4.3-py3-none-any.whl (4.3 kB)
Installing collected packages: squarify
Successfully installed squarify-0.4.3
Note: you may need to restart the kernel to use updated packages.
In [12]:
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Input In [12], in <cell line: 1>()
----> 1 import sqaurify

ModuleNotFoundError: No module named 'sqaurify'

In [13]:
In [15]:
In [16]:
In [17]:
In [18]:
In [19]:
In [20]:
In [21]:
In [22]:
In [23]:
In [24]:
In [26]:
In [27]:
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Input In [27], in <cell line: 5>()
      2 df_encoded = pd.get_dummies(df, columns=['Genre'])
      4 # Compute the pairwise distance matrix
----> 5 distance_matrix = hierarchy.distance.pdist(df_encoded)
      7 # Perform hierarchical clustering
      8 Z = hierarchy.linkage(distance_matrix, method='ward')

File ~\anaconda3\lib\site-packages\scipy\spatial\distance.py:2250, in pdist(X, metric, out, **kwargs)
   2248 if metric_info is not None:
   2249     pdist_fn = metric_info.pdist_func
-> 2250     return pdist_fn(X, out=out, **kwargs)
   2251 elif mstr.startswith("test_"):
   2252     metric_info = _TEST_METRICS.get(mstr, None)

ValueError: Unsupported dtype object

In [29]:
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
Input In [29], in <cell line: 7>()
      5 # Create the Venn diagram
      6 plt.figure(figsize=(8, 6))
----> 7 venn2([high_rating, low_rating], ('High Rating', 'Low Rating'))
      8 plt.title('Venn Diagram  ')
      9 plt.show()

NameError: name 'venn2' is not defined

<Figure size 576x432 with 0 Axes>
In [30]:
In [31]:
In [3]:
In [4]:
In [5]:
AvatarTitanicStar Wars: The ForceAwakensThe Lion KingInceptionTitleActionRomanceSci-FiAnimationSci-FiGenre20091997201520192010Year7.87.87.96.98.8Rating2787965087218746394420682236241656943394828322032Revenue
Movie Dataset
In [6]:
AvatarTitanicStar Wars: The ForceAwakensThe Lion KingInceptionTitleActionRomanceSci-FiAnimationSci-FiGenre20091997201520192010Year7.87.87.96.98.8Rating2787965087218746394420682236241656943394828322032Revenue
Table chart
In [ ]: